package com.dsp.web;

import java.io.IOException;

import jxl.read.biff.BiffException;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.core.excel.ReadExcel;
import com.core.exception.StandardException;
import com.core.util.Constants;

@Controller("DefaultController")
public class DefaultController {
	@RequestMapping(value = "/defaults")
	public ModelAndView index(@RequestParam int current) {
		ModelAndView mav = new ModelAndView();
		mav.addObject(Constants.Path, "show.jsp");
		mav.addObject(Constants.NaviCurrent , "dashboard"); //首页
		mav.setViewName(Constants.Layout);
		mav.addObject("selected" , current);
		/**ReadExcel re = new ReadExcel();
		try {
			re.run("/workspace_idea/trunk_green/WebRoot/WEB-INF/classes/com/core/excel/state.xls", null);
		} catch (BiffException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (StandardException e) {
			e.printStackTrace();
		}*/
		return mav;
	}
}
